<p class="Paragraph">MsgBox (Text As String [,Type As Integer [,Dialogtitle As String]]) <help:key-word value="MsgBox" tag="kw66524_1" xmlns:help="http://openoffice.org/2000/help"/></p>
<p class="Paragraph">Text: String expression displayed as a message in the dialog box. Line breaks can be inserted with Chr$(13). Only the first 255 characters of a string are displayed; all remaining characters are disregarded.</p>
<p class="Paragraph">DialogTitle: String expression displayed in the title bar of the dialog. If omitted, the name of the respective application is displayed.</p>
<p class="Paragraph">Type: Any integer expression that specifies the dialog type and defines the number and type of butons or icons displayed. <span class="T1">Type</span> represents a combination of bit patterns, i.e., dialog elements can be defined by adding the respective values:</p>
<p class="P2">Values</p>
<p class="Paragraph">0 : Display OK button only.</p>
<p class="Paragraph">1 : Display OK and Cancel buttons.</p>
<p class="Paragraph">2 : Display Cancel and Retry buttons.</p>
<p class="Paragraph">3 : Display Yes, No, and Cancel buttons.</p>
<p class="Paragraph">4 : Display Yes and No buttons.</p>
<p class="Paragraph">5 : Display Retry and Cancel buttons.</p>
<p class="Paragraph">16 : Add the Stop icon to the dialog.</p>
<p class="Paragraph">32 : Add the Question icon to the dialog.</p>
<p class="Paragraph">48 : Add the Explanation icon to the dialog.</p>
<p class="Paragraph">64 : Add the Information icon to the dialog.</p>
<p class="Paragraph">0 : First button in the dialog as default button.</p>
<p class="Paragraph">256 : Second button in the dialog as default button.</p>
<p class="Paragraph">512 : Third button in the dialog as default button.</p>
<p class="P2">Return value:</p>
<p class="Paragraph">1 : OK</p>
<p class="Paragraph">2 : Cancel</p>
<p class="Paragraph">4 : Retry</p>
<p class="Paragraph">5 : Ignore</p>
<p class="Paragraph">6 : Yes</p>
<p class="Paragraph">7 : No</p>
<p class="Paragraph">The MsgBox function returns a value indicating which button the user has chosen. The following return values are possible:</p>